********************************************************************************
** 	TITLE:		us2016_anes_integrity		                                  ** 	
**	AUTHOR:	    Review version                                                **
**	DATA:       anes_timeseries_2016                                          **
**	DATE:		December 2022	  			          	                      **	
**	VERSION:	Stata 16					                                  **	
********************************************************************************

* Version control

version 16.0

* Run poll file

do us2016_polls

* Open log file

capture log close       			  			              
log using "us2016_anes_integrity", replace

* Open the dataset

use "anes_timeseries_2016.dta", clear

* Election ID

gen election = "us2016-anes"


*********************************
** SATISFACTION WITH DEMOCRACY **
*********************************

* Satisfaction with democracy (post)

gen swd_post = V162290

recode swd_post -9=. -8=. -7=. -6=. 4=3 5=4

replace swd_post = 5 - swd_post

label define swd 1 "Not at all satisfied" 2 "Not very satisfied" 3 "Fairly satisfied" 4 "Satisfied"
label values swd_post swd


************************
** ELECTORAL FAIRNESS **
************************

gen integrity_5pts = V162219

recode integrity_5pts -9=. -8=. -7=. -6=.

replace integrity_5pts = 6 - integrity_5pts

gen integrity_4pts = integrity_5pts

recode integrity_4pts 4=3 5=4


***************************
** INDEPENDENT VARIABLES **
***************************

* Time

gen surveydate = date(V164004,"YMD")

format %tdMon_DD,_CCYY surveydate

gen edate = 20161108

gen electiondate=date(string(edate,"%8.0f"),"YMD")

format %tdMon_DD,_CCYY electiondate

gen time = electiondate - surveydate

* Post-election date

gen pdate = V165002

replace pdate = "" if pdate == "-6. No post-election interview"
replace pdate = "" if pdate == "-7. No post data, incomplete IW"

gen podate = date(pdate,"YMD")

format %tdMon_DD,_CCYY podate

* Gender

gen male = V161342

recode male -9=. 3=. 2=0

* Age

gen age = V161267

recode age -9=. -8=.

* Education

gen education = V161270

recode education -9=. 90=. 95=.

* Postsecondary

gen postsecondary = 0 if education < 10
replace postsecondary = 1 if education >= 10

* Region

gen state = V163001a

gen region = .

replace region = 1 if state == 09
replace region = 1 if state == 23
replace region = 1 if state == 25
replace region = 1 if state == 33
replace region = 1 if state == 44
replace region = 1 if state == 50
replace region = 1 if state == 34
replace region = 1 if state == 36
replace region = 1 if state == 42
replace region = 2 if state == 17
replace region = 2 if state == 18
replace region = 2 if state == 26
replace region = 2 if state == 39
replace region = 2 if state == 55
replace region = 2 if state == 19
replace region = 2 if state == 20
replace region = 2 if state == 27
replace region = 2 if state == 29
replace region = 2 if state == 31
replace region = 2 if state == 38
replace region = 2 if state == 46
replace region = 3 if state == 10
replace region = 3 if state == 11
replace region = 3 if state == 12
replace region = 3 if state == 13
replace region = 3 if state == 24
replace region = 3 if state == 37
replace region = 3 if state == 45
replace region = 3 if state == 51
replace region = 3 if state == 54
replace region = 3 if state == 01
replace region = 3 if state == 21
replace region = 3 if state == 28
replace region = 3 if state == 47
replace region = 3 if state == 05
replace region = 3 if state == 22
replace region = 3 if state == 40
replace region = 3 if state == 48
replace region = 4 if state == 04
replace region = 4 if state == 08
replace region = 4 if state == 16
replace region = 4 if state == 30
replace region = 4 if state == 32
replace region = 4 if state == 35
replace region = 4 if state == 49
replace region = 4 if state == 56
replace region = 4 if state == 02
replace region = 4 if state == 06
replace region = 4 if state == 15
replace region = 4 if state == 41
replace region = 4 if state == 53

label define region 1 "Northeast" 2 "Midwest" 3 "South" 4 "West"
label values region region

* Race

gen white = V161310x

recode white -2=.

replace white = 0 if white!=1 & white!=.

* Income

gen income = V161361x

recode income -9=. -5=.

* Above average income

egen income_mean = mean(income)
egen income_sd = sd(income)
gen income_std = (income - income_mean)/income_sd

gen income_above = 0 if income_std < 0
replace income_above = 1 if income_std > 0

* Caring about outcome

gen care_whole = V161145

recode care_whole -9=. -8=.

recode care_whole 2=1 3/5=0

* Closeness of election

gen closeness_whole = V161147

recode closeness_whole -9=. -8=. -1=. 1=0 2=1

* Party identification scale

gen pidscale = V161158x

recode pidscale -9=. -8=.

gen pidscale_whole = pidscale

label define pidscale 1 "Strong loser PID" 2 "Weak loser PID" 3 "Leaner loser PID" 4 "No PID" 5 "Leaner winner PID" 6 "Weak winner PID" 7 "Strong winner PID"
label values pidscale_whole pidscale

* Party identification

gen pid = pidscale

recode pid 4=0 2=1 3=1 5=2 6=2 7=2

label define pid 0 "Independent/Other" 1 "Democrat" 2 "Republican"
label values pid pid

* Party identification status

gen pidstatus_whole = pid

recode pidstatus_whole 0=2 2=3

label define pidstatus 1 "Loser PID" 2 "Independent/Other" 3 "Winner PID"
label values pidstatus_whole pidstatus

* Party identification strength

gen pidstrength =.

replace pidstrength = -99 if pidscale_whole == 4
replace pidstrength = 0 if pidscale_whole == 2 | pidscale_whole == 3 | pidscale_whole == 5 | pidscale_whole == 6
replace pidstrength = 1 if pidscale_whole == 1 | pidscale_whole == 7

label define pidstrength -99 "No PID" 0 "Weak/Leaner" 1 "Strong"
label values pidstrength strength

* Actual vote

gen prevoteact = V161027

recode prevoteact -9=. -1=.

gen voteact = V162034a 

recode voteact -9=. -7=. -6=. -1=0 7=5 9=5

replace voteact = prevoteact if prevoteact!=.

label define voteact 0 "Not voted" 1 "Hillary Clinton" 2 "Donald Trump" 3 "Gary Johnson" 4 "Jill Stein" 5 "Other"
label values voteact voteact

* Actual vote status

gen voteactstatus_whole = .

replace voteactstatus_whole = 3 if voteact == 2
replace voteactstatus_whole = 2 if voteact == 0
replace voteactstatus_whole = 1 if voteact!=2 & voteact!=. & voteactstatus_whole!=2

label values voteactstatus_whole votestatus

* Democratic candidate rating

gen demrating = V161086

recode demrating -99=. -88=.

* Republican candidate rating

gen reprating = V161087

recode reprating -99=. -88=.

* Candidate preference

gen preference = 2 if reprating > demrating
replace preference = 1 if demrating > reprating

* Candidate preference status

gen prefstatus_whole = .

replace prefstatus_whole = 1 if reprating > demrating
replace prefstatus_whole = . if demrating == reprating
replace prefstatus_whole = 0 if demrating > reprating

label define prefstatus 0 "Loser preference" 1 "Winner preference"
label values prefstatus_whole prefstatus

* Joe Biden - Correct answer (U.S. vice-president) = 1, Incorrect answer = 0

gen biden = V162072

recode biden -7=. -6=.

* Paul Ryan - Correct answer (Speaker of the House of Representatives) = 1, Incorrect answer = 0

gen ryan = V162073a

recode ryan -7=. -6=.

* Angela Merkel - Correct answer (German Chancellor) = 1, Incorrect answer = 0

gen merkel = V162074a

recode merkel -7=. -6=.

* Vladimir Putin - Correct answer (Russian President) = 1, Incorrect answer = 0

gen putin = V162075a

recode putin -7=. -6=.

* John Roberts - Correct answer (Supreme Court Chief Justice) = 1, Incorrect answer = 0

gen roberts = V162076b

recode roberts -7=. -6=.

* Party with the most members in the U.S. House before election - Correct answer (Republican) = 1, Incorrect answer = 0

gen house = V161515

recode house -9=. -5=. 1=0 2=1

* Party with the most members in the U.S. Senate before election - Correct answer (Republican) = 1, Incorrect answer = 0

gen senate = V161516

recode senate -9=. -5=. 1=0 2=1

* Political knowledge index

gen knowledge = ryan + biden + merkel + putin + roberts + house + senate

sum knowledge

gen knowledge_n = (knowledge - `r(min)') / (`r(max)'-`r(min)')

* Above average knowledge

egen knowledge_mean = mean(knowledge)
egen knowledge_sd = sd(knowledge)
gen knowledge_std = (knowledge - knowledge_mean)/knowledge_sd

gen knowledge_above = 0 if knowledge_std < 0
replace knowledge_above = 1 if knowledge_std > 0

* Economy (sociotropic)

gen econ_soc_now = V161139 // Current

recode econ_soc_now -9=. -8=.

replace econ_soc_now = 6 - econ_soc_now

gen econ_soc_ret = V161140x // Retrospective

recode econ_soc_ret -2=.

replace econ_soc_ret = 6 - econ_soc_ret

gen econ_soc_pro = V161141x // Prospective

recode econ_soc_pro -2=.

replace econ_soc_pro = 6 - econ_soc_pro

* Economy (egotropic)

gen econ_ego_ret = V161110 // Retrospective

recode econ_ego_ret -9=. -8=.

replace econ_ego_ret = 6 - econ_ego_ret

gen econ_ego_pro = V161111 // Prospective

recode econ_ego_pro -9=. -8=.

replace econ_ego_pro = 6 - econ_ego_pro

* Economy index (sociotropic)
 
gen economy_soc = econ_soc_now + econ_soc_ret + econ_soc_pro

sum economy_soc

replace economy_soc = (economy_soc - `r(min)') / (`r(max)'-`r(min)')

* Economy index (egotropic)
 
gen economy_ego = econ_ego_ret + econ_ego_pro

sum economy_ego

replace economy_ego = (economy_ego - `r(min)') / (`r(max)'-`r(min)')

* Trust government to do right thing (pre)

gen govtright_pre = V161215

recode govtright_pre -9=. -8=.

replace govtright_pre = govtright_pre - 1

* Waste money (pre)

gen waste_pre = V161217

recode waste_pre -9=. -8=.

replace waste_pre = 3 - waste_pre

* Big interests (pre)

gen biginterests_pre = V161216

recode biginterests_pre -9=. -8=.

replace biginterests_pre = 2 - biginterests_pre

* Crooked (pre)

gen crooked_pre = V161218

recode crooked_pre -9=. -8=.

replace crooked_pre = 5 - crooked_pre

* Political cynicism (pre)

gen cynicism_pre = govtright_pre + waste_pre + biginterests_pre + crooked_pre

sum cynicism_pre

gen cynicism_pre_n = (cynicism_pre - `r(min)') / (`r(max)'-`r(min)')

* Public officials don't care (post)

gen dontcare_post = V162215

recode dontcare_post -9=. -8=. -7=. -6=.

replace dontcare_post = 6 - dontcare_post

* How widespread is corruption (post)

gen corrupt_post = V162275

recode corrupt_post -9=. -8=. -7=. -6=.

replace corrupt_post = 5 - corrupt_post

* Most politicians do not care about the people (post)

gen carepeople_post = V162260

recode carepeople_post -9=. -8=. -7=. -6=.

replace carepeople_post = 6 - carepeople_post

* Most politicians are trustworthy (post)

gen poltrust_post = V162261

recode poltrust_post -9=. -8=. -7=. -6=.

replace poltrust_post = 6 - poltrust_post

* Politicians are the main problem in the United States (post)

gen mainprob_post = V162262

recode mainprob_post -9=. -8=. -7=. -6=.

replace mainprob_post = 6 - mainprob_post

* Most politicians care only about the interests of the rich and powerful (post)

gen carerich_post = V162265

recode carerich_post -9=. -8=. -7=. -6=.

replace carerich_post = 6 - carerich_post

* Political cynicism (post)

gen cynicism_post = dontcare_post + corrupt_post + carepeople_post + poltrust_post + mainprob_post + carerich_post

sum cynicism_post

gen cynicism_post_n = (cynicism_post - `r(min)') / (`r(max)'-`r(min)')

* Political cynicism (pre/post)

gen cynicism_prepost = govtright_pre + waste_pre + biginterests_pre + crooked_pre + dontcare_post + corrupt_post + carepeople_post + poltrust_post + mainprob_post + carerich_post

sum cynicism_prepost

gen cynicism_prepost_n = (cynicism_prepost - `r(min)') / (`r(max)'-`r(min)')

* Above average political cynicism (pre)

egen cynicism_mean = mean(cynicism_pre)
egen cynicism_sd = sd(cynicism_pre)
gen cynicism_std = (cynicism_pre - cynicism_mean)/cynicism_sd

gen cynicism_above = 0 if cynicism_std < 0
replace cynicism_above = 1 if cynicism_std > 0

* Social mistrust

gen people = V161219

recode people -9=. -8=.

* Did the U.S. government know about 9/11 in advance?

gen govt911 = V162254

recode govt911 -9=. -8=. -7=. -6=.

replace govt911 = 4 - govt911

* Is Barack Obama a Muslim, or is he not a Muslim?

gen muslim = V162255x

recode muslim -9=. -8=. -7=. -6=.

replace muslim = 10 - muslim

* Global warming

gen warming = V161221

recode warming -9=. -8=. 1=0 2=1

* Conspiratorial thinking

gen conspiracy = govt911 + muslim

sum conspiracy

gen conspiracy_n = (conspiracy - `r(min)') / (`r(max)'-`r(min)')

egen conspiracy_n_std = std(conspiracy_n)

* Above average conspiratorial thinking

egen conspiracy_mean = mean(conspiracy)
egen conspiracy_sd = sd(conspiracy)
gen conspiracy_std = (conspiracy - conspiracy_mean)/conspiracy_sd

gen conspiracy_above = 0 if conspiracy_std < 0
replace conspiracy_above = 1 if conspiracy_std > 0

* Conspiratorial thinking (conservatives)

gen conspiracy_cons = muslim

sum conspiracy_cons

replace conspiracy_cons = (conspiracy_cons - `r(min)') / (`r(max)'-`r(min)')

egen conspiracy_cons_std = std(conspiracy_cons)

* Conspiratorial thinking (liberals)

gen conspiracy_lib = govt911

sum conspiracy_lib

replace conspiracy_lib = (conspiracy_lib - `r(min)') / (`r(max)'-`r(min)')

egen conspiracy_lib_std = std(conspiracy_lib)

* Suspicion index

gen suspicion = govt911 + muslim + govtright_pre + waste_pre + biginterests_pre + crooked_pre + people

recode suspicion 4=6 5=6 25=24 26=24 27=24

sum suspicion

replace suspicion = (suspicion - `r(min)') / (`r(max)'-`r(min)')

egen suspicion5 = xtile(suspicion), nq(5)

* Suspicion quintile

xtile suspicion10 = suspicion, nq(10)

* Survey weight

gen weight = V160102


******************
** EXPECTATIONS **
******************

* Forecasts (1 = Democrat, 2 = Republican, 5 = other)

gen forecast_whole = V161146

recode forecast_whole 3=1 4=2 -9=.

* Identify correct forecasts

gen correct_whole_d = 0 if forecast_whole!=2 & forecast_whole!=.
replace correct_whole_d = 1 if forecast_whole == 2

* Mean of correct forecasts by day

bysort time : egen correct_mean = mean(correct_whole_d)

* PID matches forecast

gen match = .

replace match = 1 if pid == 1 & forecast_whole == 1
replace match = 1 if pid == 2 & forecast_whole == 2
replace match = 0 if pid == 1 & forecast_whole == 2
replace match = 0 if pid == 2 & forecast_whole == 1

* Consistency (PID)

gen dissonant_p = .

replace dissonant_p = 0 if pid == 1 & forecast_whole == 1
replace dissonant_p = 1 if pid == 1 & forecast_whole == 2
replace dissonant_p = 1 if pid == 1 & forecast_whole == 5

replace dissonant_p = 0 if pid == 2 & forecast_whole == 2
replace dissonant_p = 1 if pid == 2 & forecast_whole == 1
replace dissonant_p = 1 if pid == 2 & forecast_whole == 5

* Consistency (vote)

gen dissonant_v = .

replace dissonant_v = 0 if voteact == 1 & forecast_whole == 1
replace dissonant_v = 1 if voteact == 1 & forecast_whole == 2
replace dissonant_v = 1 if voteact == 1 & forecast_whole == 5

replace dissonant_v = 0 if voteact == 2 & forecast_whole == 2
replace dissonant_v = 1 if voteact == 2 & forecast_whole == 1
replace dissonant_v = 1 if voteact == 2 & forecast_whole == 5


******************************
** RESPONDENTS' STATUS: PID **
******************************

* PID (all respondents)

gen unxloser_whole_p = 1 if pid == forecast_whole & pidstatus_whole == 1 & pid!=. // unexpected_p losers

gen exploser_whole_p = 1 if pid!=forecast_whole & pidstatus_whole == 1 & pid!=. // Expected losers

gen unxwinner_whole_p = 1 if pid!=forecast_whole & pidstatus_whole == 3 & pid!=. // unexpected_p winners

gen expwinner_whole_p = 1 if pid == forecast_whole & pidstatus_whole == 3 & pid!=. // Expected winners

gen nopid = 1 if pid == 0 // No PID

replace unxloser_whole_p = 0 if exploser_whole_p == 1 | unxwinner_whole_p == 1 | expwinner_whole_p == 1 | nopid == 1
replace exploser_whole_p = 0 if unxloser_whole_p == 1 | unxwinner_whole_p == 1 | expwinner_whole_p == 1 | nopid == 1
replace unxwinner_whole_p = 0 if unxloser_whole_p == 1 | exploser_whole_p == 1 | expwinner_whole_p == 1 | nopid == 1
replace expwinner_whole_p = 0 if unxloser_whole_p == 1 | exploser_whole_p == 1 | unxwinner_whole_p == 1 | nopid == 1
replace nopid = 0 if pid!=0 & pid!=.

gen status_whole_p = .

replace status_whole_p = 1 if unxloser_whole_p == 1
replace status_whole_p = 2 if exploser_whole_p == 1
replace status_whole_p = 3 if nopid == 1
replace status_whole_p = 4 if expwinner_whole_p == 1
replace status_whole_p = 5 if unxwinner_whole_p == 1
replace status_whole_p = . if pid == . | forecast_whole == .

* PID (excluding independents/others)

gen status_whole_p_noind = status_whole_p

replace status_whole_p_noind = . if pid == 0

* Generate binary variable for unexpected_p outcomes

gen unexpected_p = 0 if status_whole_p == 2 | status_whole_p == 4 | status_whole_p == 3 & correct_whole_d == 1
replace unexpected_p = 1 if status_whole_p == 1 | status_whole_p == 5 | status_whole_p == 3 & correct_whole_d == 0


*******************************
** RESPONDENTS' STATUS: VOTE **
*******************************

* Actual vote

gen unxloser_whole_v = 1 if voteact == forecast_whole & voteactstatus_whole == 1 & voteact!=. // Unexpected losers

gen exploser_whole_v = 1 if voteact!=forecast_whole & voteactstatus_whole == 1 & voteact!=. // Expected losers

gen unxwinner_whole_v = 1 if voteact!=forecast_whole & voteactstatus_whole == 3 & voteact!=. // Unexpected winners

gen expwinner_whole_v = 1 if voteact == forecast_whole & voteactstatus_whole == 3 & voteact!=. // Expected winners

gen novoteact = 1 if voteact == 0 // No vote

replace unxloser_whole_v = 0 if exploser_whole_v == 1 | unxwinner_whole_v == 1 | expwinner_whole_v == 1 | novoteact == 1
replace exploser_whole_v = 0 if unxloser_whole_v == 1 | unxwinner_whole_v == 1 | expwinner_whole_v == 1 | novoteact == 1
replace unxwinner_whole_v = 0 if unxloser_whole_v == 1 | exploser_whole_v == 1 | expwinner_whole_v == 1 | novoteact == 1
replace expwinner_whole_v = 0 if unxloser_whole_v == 1 | exploser_whole_v == 1 | unxwinner_whole_v == 1 | novoteact == 1
replace novoteact = 0 if voteact!=0 & voteact!=.

gen status_whole_v = .

replace status_whole_v = 1 if unxloser_whole_v == 1
replace status_whole_v = 2 if exploser_whole_v == 1
replace status_whole_v = 3 if novoteact == 1
replace status_whole_v = 4 if expwinner_whole_v == 1
replace status_whole_v = 5 if unxwinner_whole_v == 1
replace status_whole_v = . if voteact == . | forecast_whole == .

* Generate binary variable for unexpected outcomes

gen unexpected_v = 0 if status_whole_v == 2 | status_whole_v == 4 | status_whole_v == 3 & correct_whole_d == 1
replace unexpected_v = 1 if status_whole_v == 1 | status_whole_v == 5 | status_whole_v == 3 & correct_whole_d == 0


*************************************
** RESPONDENTS' STATUS: PREFERENCE **
*************************************

* Candidate preference

gen unxloser_whole_r = 1 if preference == forecast_whole & prefstatus_whole == 0 & preference!=. // Unexpected losers

gen exploser_whole_r = 1 if preference!=forecast_whole & prefstatus_whole == 0 & preference!=. // Expected losers

gen unxwinner_whole_r = 1 if preference!=forecast_whole & prefstatus_whole == 1 & preference!=. // Unexpected winners

gen expwinner_whole_r = 1 if preference == forecast_whole & prefstatus_whole == 1 & preference!=. // Expected winners

replace unxloser_whole_r = 0 if exploser_whole_r == 1 | unxwinner_whole_r == 1 | expwinner_whole_r == 1
replace exploser_whole_r = 0 if unxloser_whole_r == 1 | unxwinner_whole_r == 1 | expwinner_whole_r == 1
replace unxwinner_whole_r = 0 if unxloser_whole_r == 1 | exploser_whole_r == 1 | expwinner_whole_r == 1
replace expwinner_whole_r = 0 if unxloser_whole_r == 1 | exploser_whole_r == 1 | unxwinner_whole_r == 1

gen status_whole_r = .

replace status_whole_r = 1 if unxloser_whole_r == 1
replace status_whole_r = 2 if exploser_whole_r == 1
replace status_whole_r = 3 if expwinner_whole_r == 1
replace status_whole_r = 4 if unxwinner_whole_r == 1
replace status_whole_r = . if voteact == . | forecast_whole == .

* Generate binary variable for unexpected outcomes

gen unexpected_r = 0 if status_whole_r == 2 | status_whole_r == 3
replace unexpected_r = 1 if status_whole_r == 1 | status_whole_r == 4


**************************
** MERGE WITH POLL DATA **
**************************

* Merge

nearmrg using "us2016_polls.dta", lower nearvar(time)
drop _merge

* Congruent polling information

gen congruent = .

replace congruent = 1 if ahead_mean3 == 1 & forecast_whole == 1
replace congruent = 1 if ahead_mean3 == 2 & forecast_whole == 1 & pollmar_mean3 <= 2
replace congruent = 0 if ahead_mean3 == 2 & forecast_whole == 1 & pollmar_mean3 > 2

replace congruent = 1 if ahead_mean3 == 2 & forecast_whole == 2
replace congruent = 1 if ahead_mean3 == 1 & forecast_whole == 2 & pollmar_mean3 <= 2
replace congruent = 0 if ahead_mean3 == 1 & forecast_whole == 2 & pollmar_mean3 > 2


**********************
** SELECT VARIABLES **
**********************

* Keep needed variables

keep election podate integrity_4pts swd_post match pid pidstatus_whole pidscale_whole voteactstatus_whole prefstatus_whole unexpected_p unexpected_v unexpected_r conspiracy_above conspiracy_n conspiracy_n_std cynicism_pre cynicism_pre_n cynicism_post cynicism_post_n cynicism_prepost cynicism_prepost_n cynicism_above conspiracy_cons conspiracy_cons_std conspiracy_lib conspiracy_lib_std people suspicion suspicion5 economy_soc economy_ego knowledge knowledge_n knowledge_above male white age income income_above education postsecondary region closeness_whole care_whole correct_whole_d correct_mean time dissonant_p dissonant_v congruent pollmar_mean3 weight


**********
** SAVE **
**********

save "us2016_anes_integrity.dta", replace


************
** TABLES **
************

* Party identification

eststo: regress integrity_4pts i.pidstatus_whole conspiracy_n cynicism_pre_n people knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.pidstatus_whole conspiracy_n cynicism_pre_n people economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress integrity_4pts i.pidstatus_whole##i.unexpected_p conspiracy_n cynicism_pre_n people knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.pidstatus_whole##i.unexpected_p conspiracy_n cynicism_pre_n people economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]

esttab using "us2016_anes_integrity_pid.tex", alignment(ll) substitute({table} {table*} \begin{tabular*} \small\begin{tabular*}) wide drop(0.male 1.male 0.white 1.white age income education 1.region 2.region 3.region 4.region 0.unexpected_p 1.pidstatus_whole#0.unexpected_p 2.pidstatus_whole#0.unexpected_p 3.pidstatus_whole#0.unexpected_p 1.pidstatus_whole#1.unexpected_p) refcat(1.pidstatus_whole "\textbf{\textit{Electoral status}}" 1.unexpected_p "\textbf{\textit{Unexpected outcome?}}" 2.pidstatus_whole#1.unexpected_p "\textbf{\textit{2-way interaction}}" conspiracy_n "\textbf{\textit{Suspicious thinking}}" economy_ego "\textbf{\textit{Economic evaluations}}" knowledge_n "\textbf{\textit{Information}}", nolabel) width(\hsize) pr2(2) b(2) not star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label mtitles("FAIR" "SWD" "FAIR" "SWD") interaction("$\times$")style(tex) replace booktabs varlabels(_cons "\textbf{\textit{Constant}}" 1.pidstatus_whole "\hspace{1em} Loser (R)" 2.pidstatus_whole "\hspace{1em} Independent" 3.pidstatus_whole "\hspace{1em} Winner" 1.unexpected_p "\hspace{1em} Yes" 2.pidstatus_whole#1.unexpected_p "\hspace{1em} Independent $\times$ Unexpected" 3.pidstatus_whole#1.unexpected_p "\hspace{1em} Winner $\times$ Unexpected" cynicism_pre_n "\hspace{1em} Political cynicism" people "\hspace{1em} Social mistrust" conspiracy_n "\hspace{1em} Conspiracy beliefs" knowledge_n "\hspace{1em} Political knowledge" economy_ego "\hspace{1em} Egotropic" economy_soc "\hspace{1em} Sociotropic" ) order(1.pidstatus_whole 2.pidstatus_whole 3.pidstatus_whole 1.unexpected_p 2.pidstatus_whole#1.unexpected_p 3.pidstatus_whole#1.unexpected_p conspiracy_n cynicism_pre_n people economy_ego economy_soc knowledge_n) stats(N r2, labels("Observations" "\textit{R}\textsuperscript{2}") fmt(%9.0fc %9.2fc)) nonotes title("Perceived Electoral Integrity and Satisfaction with Democracy, 2016 U.S. Presidential Election")

eststo clear

* Reported vote

eststo: regress integrity_4pts i.voteactstatus_whole conspiracy_n cynicism_pre_n people knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.voteactstatus_whole conspiracy_n cynicism_pre_n people economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress integrity_4pts i.voteactstatus_whole##i.unexpected_v conspiracy_n cynicism_pre_n people knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.voteactstatus_whole##i.unexpected_v conspiracy_n cynicism_pre_n people economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]

esttab using "us2016_anes_integrity_vote.tex", alignment(ll) substitute({table} {table*} \begin{tabular*} \small\begin{tabular*}) wide drop(0.male 1.male 0.white 1.white age income education 1.region 2.region 3.region 4.region 0.unexpected_v 1.voteactstatus_whole#0.unexpected_v 2.voteactstatus_whole#0.unexpected_v 3.voteactstatus_whole#0.unexpected_v 1.voteactstatus_whole#1.unexpected_v) refcat(1.voteactstatus_whole "\textbf{\textit{Electoral status}}" 1.unexpected_v "\textbf{\textit{Unexpected outcome?}}" 2.voteactstatus_whole#1.unexpected_v "\textbf{\textit{2-way interaction}}" conspiracy_n "\textbf{\textit{Suspicious thinking}}" economy_ego "\textbf{\textit{Economic evaluations}}" knowledge_n "\textbf{\textit{Information}}", nolabel) width(\hsize) pr2(2) b(2) not star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label mtitles("FAIR" "SWD" "FAIR" "SWD") interaction("$\times$")style(tex) replace booktabs varlabels(_cons "\textbf{\textit{Constant}}" 1.voteactstatus_whole "\hspace{1em} Loser (R)" 2.voteactstatus_whole "\hspace{1em} Non-voter" 3.voteactstatus_whole "\hspace{1em} Winner" 1.unexpected_v "\hspace{1em} Yes" 2.voteactstatus_whole#1.unexpected_v "\hspace{1em} Non-voter $\times$ Unexpected" 3.voteactstatus_whole#1.unexpected_v "\hspace{1em} Winner $\times$ Unexpected" cynicism_pre_n "\hspace{1em} Political cynicism" people "\hspace{1em} Social mistrust" conspiracy_n "\hspace{1em} Conspiracy beliefs" knowledge_n "\hspace{1em} Political knowledge" economy_ego "\hspace{1em} Egotropic" economy_soc "\hspace{1em} Sociotropic" ) order(1.voteactstatus_whole 2.voteactstatus_whole 3.voteactstatus_whole 1.unexpected_v 2.voteactstatus_whole#1.unexpected_v 3.voteactstatus_whole#1.unexpected_v conspiracy_n cynicism_pre_n people economy_ego economy_soc knowledge_n) stats(N r2, labels("Observations" "\textit{R}\textsuperscript{2}") fmt(%9.0fc %9.2fc)) nonotes title("Perceived Electoral Integrity and Satisfaction with Democracy, 2016 U.S. Presidential Election")

eststo clear

* Conspiracy beliefs (conservative and liberal)

eststo: regress integrity_4pts i.pidstatus_whole##i.unexpected_p conspiracy_n_std cynicism_pre_n people knowledge_n i.male i.white age income education i.region
eststo: regress integrity_4pts i.pidstatus_whole##i.unexpected_p conspiracy_cons_std conspiracy_lib_std cynicism_pre_n people knowledge_n i.male i.white age income education i.region
eststo: regress swd_post i.pidstatus_whole##i.unexpected_p conspiracy_n_std cynicism_pre_n people economy_soc economy_ego knowledge_n i.male i.white age income education i.region
eststo: regress swd_post i.pidstatus_whole##i.unexpected_p conspiracy_cons_std conspiracy_lib_std cynicism_pre_n people economy_soc economy_ego knowledge_n i.male i.white age income education i.region

esttab using "us2016_anes_integrity_conspiracy_pid.tex", alignment(ll) substitute({table} {table*} \begin{tabular*} \small\begin{tabular*}) wide drop(0.male 1.male 0.white 1.white 0.unexpected_p 1.pidstatus_whole#0.unexpected_p 2.pidstatus_whole#0.unexpected_p 3.pidstatus_whole#0.unexpected_p 1.pidstatus_whole#1.unexpected_p age income education 1.region 2.region 3.region 4.region) refcat(1.pidstatus_whole "\textbf{\textit{Electoral status}}" 1.unexpected_p "\textbf{\textit{Unexpected outcome?}}" 2.pidstatus_whole#1.unexpected_p "\textbf{\textit{Interaction}}" conspiracy_n_std "\textbf{\textit{Suspicion}}" economy_soc "\textbf{\textit{Economic evaluations}}" knowledge_n "\textbf{\textit{Information}}", nolabel) width(\hsize) pr2(2) b(2) not star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label mtitles("1 item" "2 items" "1 item" "2 items") interaction("$\times$")style(tex) replace booktabs varlabels(_cons "\textbf{\textit{Constant}}" 1.pidstatus_whole "\hspace{1em} Loser (R)" 2.pidstatus_whole "\hspace{1em} Independent" 3.pidstatus_whole "\hspace{1em} Winner" 1.unexpected_p "\hspace{1em} Yes" 2.pidstatus_whole#1.unexpected_p "\hspace{1em} Independent $\times$ Unexpected" 3.pidstatus_whole#1.unexpected_p "\hspace{1em} Winner $\times$ Unexpected" conspiracy_n_std "\hspace{1em} Conspiracy beliefs" conspiracy_cons_std "\hspace{2em} Conspiracy beliefs (Con)" conspiracy_lib_std "\hspace{2em} Conspiracy beliefs (Lib)" cynicism_pre_n "\hspace{1em} Political cynicism" people "\hspace{1em} Social mistrust" economy_soc "\hspace{1em} Sociotropic" economy_ego "\hspace{1em} Egotropic" knowledge_n "\hspace{1em} Political knowledge") order(1.pidstatus_whole 2.pidstatus_whole 3.pidstatus_whole 1.unexpected_p 2.pidstatus_whole#1.unexpected_p 3.pidstatus_whole#1.unexpected_p conspiracy_n_std conspiracy_cons_std conspiracy_lib_std cynicism_pre_n people economy_soc economy_ego knowledge_n) stats(N r2, labels("Observations" "\textit{R}\textsuperscript{2}") fmt(%9.0fc %9.2fc)) nonotes title("Perceived Electoral Integrity and Satisfaction with Democracy, 2016 U.S. Presidential Election")

eststo clear

eststo: regress integrity_4pts i.voteactstatus_whole##i.unexpected_v conspiracy_n_std cynicism_pre_n people knowledge_n i.male i.white age income education i.region
eststo: regress integrity_4pts i.voteactstatus_whole##i.unexpected_v conspiracy_cons_std conspiracy_lib_std cynicism_pre_n people knowledge_n i.male i.white age income education i.region
eststo: regress swd_post i.voteactstatus_whole##i.unexpected_v conspiracy_n_std cynicism_pre_n people economy_soc economy_ego knowledge_n i.male i.white age income education i.region
eststo: regress swd_post i.voteactstatus_whole##i.unexpected_v conspiracy_cons_std conspiracy_lib_std cynicism_pre_n people economy_soc economy_ego knowledge_n i.male i.white age income education i.region

esttab using "us2016_anes_integrity_conspiracy_vote.tex", alignment(ll) substitute({table} {table*} \begin{tabular*} \small\begin{tabular*}) wide drop(0.male 1.male 0.white 1.white 0.unexpected_v 1.voteactstatus_whole#0.unexpected_v 2.voteactstatus_whole#0.unexpected_v 3.voteactstatus_whole#0.unexpected_v 1.voteactstatus_whole#1.unexpected_v age income education 1.region 2.region 3.region 4.region) refcat(1.voteactstatus_whole "\textbf{\textit{Electoral status}}" 1.unexpected_v "\textbf{\textit{Unexpected outcome?}}" 2.voteactstatus_whole#1.unexpected_v "\textbf{\textit{Interaction}}" conspiracy_n_std "\textbf{\textit{Suspicion}}" economy_soc "\textbf{\textit{Economic evaluations}}" knowledge_n "\textbf{\textit{Information}}", nolabel) width(\hsize) pr2(2) b(2) not star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label mtitles("1 item" "2 items" "1 item" "2 items") interaction("$\times$")style(tex) replace booktabs varlabels(_cons "\textbf{\textit{Constant}}" 1.voteactstatus_whole "\hspace{1em} Loser (R)" 2.voteactstatus_whole "\hspace{1em} Non-voter" 3.voteactstatus_whole "\hspace{1em} Winner" 1.unexpected_v "\hspace{1em} Yes" 2.voteactstatus_whole#1.unexpected_v "\hspace{1em} Non-voter $\times$ Unexpected" 3.voteactstatus_whole#1.unexpected_v "\hspace{1em} Winner $\times$ Unexpected" conspiracy_n_std "\hspace{1em} Conspiracy beliefs" conspiracy_cons_std "\hspace{2em} Conspiracy beliefs (Con)" conspiracy_lib_std "\hspace{2em} Conspiracy beliefs (Lib)" cynicism_pre_n "\hspace{1em} Political cynicism" people "\hspace{1em} Social mistrust" economy_soc "\hspace{1em} Sociotropic" economy_ego "\hspace{1em} Egotropic" knowledge_n "\hspace{1em} Political knowledge") order(1.voteactstatus_whole 2.voteactstatus_whole 3.voteactstatus_whole 1.unexpected_v 2.voteactstatus_whole#1.unexpected_v 3.voteactstatus_whole#1.unexpected_v conspiracy_n_std conspiracy_cons_std conspiracy_lib_std cynicism_pre_n people economy_soc economy_ego knowledge_n) stats(N r2, labels("Observations" "\textit{R}\textsuperscript{2}") fmt(%9.0fc %9.2fc)) nonotes title("Perceived Electoral Integrity and Satisfaction with Democracy, 2016 U.S. Presidential Election")

eststo clear

* Three-way interaction (PID)

eststo: regress integrity_4pts i.pidstatus_whole##i.unexpected_p##c.suspicion knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.pidstatus_whole##i.unexpected_p##c.suspicion economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]

esttab using "us2016_anes_integrity_3x_pid.tex", alignment(ll) substitute({table} {table*} \begin{tabular*} \small\begin{tabular*}) wide drop(0.male 1.male 0.white 1.white age income education 1.region 2.region 3.region 4.region 0.unexpected_p 1.pidstatus_whole#0.unexpected_p 2.pidstatus_whole#0.unexpected_p 3.pidstatus_whole#0.unexpected_p 1.pidstatus_whole#1.unexpected_p 0.unexpected_p#c.suspicion 1.pidstatus_whole#c.suspicion 0.unexpected_p#c.suspicion 1.pidstatus_whole#1.unexpected_p#c.suspicion 1.pidstatus_whole#0.unexpected_p#c.suspicion 2.pidstatus_whole#0.unexpected_p#c.suspicion 3.pidstatus_whole#0.unexpected_p#c.suspicion) refcat(1.pidstatus_whole "\textbf{\textit{Electoral status}}" 1.unexpected_p "\textbf{\textit{Unexpected outcome?}}" 2.pidstatus_whole#1.unexpected_p "\textbf{\textit{2-way interactions}}" 2.pidstatus_whole#1.unexpected_p#c.suspicion "\textbf{\textit{3-way interaction}}" suspicion "\textbf{\textit{Suspicious thinking}}" economy_ego "\textbf{\textit{Economic evaluations}}" knowledge_n "\textbf{\textit{Information}}", nolabel) width(\hsize) pr2(2) b(2) not star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label mtitles("FAIR" "SWD") interaction("$\times$")style(tex) replace booktabs varlabels(_cons "\textbf{\textit{Constant}}" 1.pidstatus_whole "\hspace{1em} Loser (R)" 2.pidstatus_whole "\hspace{1em} Independent" 3.pidstatus_whole "\hspace{1em} Winner" 1.unexpected_p "\hspace{1em} Yes" 2.pidstatus_whole#1.unexpected_p "\hspace{1em} Independent $\times$ Unexpected" 3.pidstatus_whole#1.unexpected_p "\hspace{1em} Winner $\times$ Unexpected" suspicion "\hspace{1em} Suspicion index" economy_ego "\hspace{1em} Egotropic" economy_soc "\hspace{1em} Sociotropic" knowledge_n "\hspace{1em} Political knowledge" 2.pidstatus_whole#c.suspicion "\hspace{1em} Independent $\times$ Suspicion" 3.pidstatus_whole#c.suspicion "\hspace{1em} Winner $\times$ Suspicion" 1.unexpected_p#c.suspicion "\hspace{1em} Unexpected $\times$ Suspicion" 2.pidstatus_whole#1.unexpected_p#c.suspicion "\hspace{1em} Independent $\times$ Unexpected $\times$ Suspicion" 3.pidstatus_whole#1.unexpected_p#c.suspicion "\hspace{1em} Winner $\times$ Unexpected $\times$ Suspicion") order(1.pidstatus_whole 2.pidstatus_whole 3.pidstatus_whole 1.unexpected_p 2.pidstatus_whole#1.unexpected_p 3.pidstatus_whole#1.unexpected_p 2.pidstatus_whole#c.suspicion 3.pidstatus_whole#c.suspicion 1.unexpected_p#c.suspicion 2.pidstatus_whole#1.unexpected_p#c.suspicion 3.pidstatus_whole#1.unexpected_p#c.suspicion suspicion economy_ego economy_soc knowledge_n) stats(N r2, labels("Observations" "\textit{R}\textsuperscript{2}") fmt(%9.0fc %9.2fc)) nonotes title("Perceived Electoral Integrity and Satisfaction with Democracy, 2016 U.S. Presidential Election")

eststo clear

* Three-way interaction (vote)

eststo: regress integrity_4pts i.voteactstatus_whole##i.unexpected_v##c.suspicion knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.voteactstatus_whole##i.unexpected_v##c.suspicion economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]

esttab using "us2016_anes_integrity_3x_vote.tex", alignment(ll) substitute({table} {table*} \begin{tabular*} \small\begin{tabular*}) wide drop(0.male 1.male 0.white 1.white age income education 1.region 2.region 3.region 4.region 0.unexpected_v 1.voteactstatus_whole#0.unexpected_v 2.voteactstatus_whole#0.unexpected_v 3.voteactstatus_whole#0.unexpected_v 1.voteactstatus_whole#1.unexpected_v 0.unexpected_v#c.suspicion 1.voteactstatus_whole#c.suspicion 0.unexpected_v#c.suspicion 1.voteactstatus_whole#1.unexpected_v#c.suspicion 1.voteactstatus_whole#0.unexpected_v#c.suspicion 2.voteactstatus_whole#0.unexpected_v#c.suspicion 3.voteactstatus_whole#0.unexpected_v#c.suspicion) refcat(1.voteactstatus_whole "\textbf{\textit{Electoral status}}" 1.unexpected_v "\textbf{\textit{Unexpected outcome?}}" 2.voteactstatus_whole#1.unexpected_v "\textbf{\textit{2-way interactions}}" 2.voteactstatus_whole#1.unexpected_v#c.suspicion "\textbf{\textit{3-way interaction}}" suspicion "\textbf{\textit{Suspicious thinking}}" economy_ego "\textbf{\textit{Economic evaluations}}" knowledge_n "\textbf{\textit{Information}}", nolabel) width(\hsize) pr2(2) b(2) not star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label mtitles("FAIR" "SWD") interaction("$\times$")style(tex) replace booktabs varlabels(_cons "\textbf{\textit{Constant}}" 1.voteactstatus_whole "\hspace{1em} Loser (R)" 2.voteactstatus_whole "\hspace{1em} Non-voter" 3.voteactstatus_whole "\hspace{1em} Winner" 1.unexpected_v "\hspace{1em} Yes" 2.voteactstatus_whole#1.unexpected_v "\hspace{1em} Non-voter $\times$ Unexpected" 3.voteactstatus_whole#1.unexpected_v "\hspace{1em} Winner $\times$ Unexpected" suspicion "\hspace{1em} Suspicion index" economy_ego "\hspace{1em} Egotropic" economy_soc "\hspace{1em} Sociotropic" knowledge_n "\hspace{1em} Political knowledge" 2.voteactstatus_whole#c.suspicion "\hspace{1em} Non-voter $\times$ Suspicion" 3.voteactstatus_whole#c.suspicion "\hspace{1em} Winner $\times$ Suspicion" 1.unexpected_v#c.suspicion "\hspace{1em} Unexpected $\times$ Suspicion" 2.voteactstatus_whole#1.unexpected_v#c.suspicion "\hspace{1em} Non-voter $\times$ Unexpected $\times$ Suspicion" 3.voteactstatus_whole#1.unexpected_v#c.suspicion "\hspace{1em} Winner $\times$ Unexpected $\times$ Suspicion") order(1.voteactstatus_whole 2.voteactstatus_whole 3.voteactstatus_whole 1.unexpected_v 2.voteactstatus_whole#1.unexpected_v 3.voteactstatus_whole#1.unexpected_v 2.voteactstatus_whole#c.suspicion 3.voteactstatus_whole#c.suspicion 1.unexpected_v#c.suspicion 2.voteactstatus_whole#1.unexpected_v#c.suspicion 3.voteactstatus_whole#1.unexpected_v#c.suspicion suspicion economy_ego economy_soc knowledge_n) stats(N r2, labels("Observations" "\textit{R}\textsuperscript{2}") fmt(%9.0fc %9.2fc)) nonotes title("Perceived Electoral Integrity and Satisfaction with Democracy, 2016 U.S. Presidential Election")

eststo clear

* Party identification, Political cynicism

eststo: regress integrity_4pts i.pidstatus_whole##i.unexpected_p conspiracy_n cynicism_pre_n people knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress integrity_4pts i.pidstatus_whole##i.unexpected_p conspiracy_n cynicism_post_n people knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress integrity_4pts i.pidstatus_whole##i.unexpected_p conspiracy_n cynicism_prepost_n people knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.pidstatus_whole##i.unexpected_p conspiracy_n cynicism_pre_n people economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.pidstatus_whole##i.unexpected_p conspiracy_n cynicism_post_n people economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.pidstatus_whole##i.unexpected_p conspiracy_n cynicism_prepost_n people economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]

esttab using "us2016_anes_integrity_cynicism_pid.tex", alignment(ll) substitute({table} {table*} \begin{tabular*} \small\begin{tabular*}) wide drop(0.male 1.male 0.white 1.white age income education 1.region 2.region 3.region 4.region 0.unexpected_p 1.pidstatus_whole#0.unexpected_p 2.pidstatus_whole#0.unexpected_p 3.pidstatus_whole#0.unexpected_p 1.pidstatus_whole#1.unexpected_p) refcat(1.pidstatus_whole "\textbf{\textit{Electoral status}}" 1.unexpected_p "\textbf{\textit{Unexpected outcome?}}" 2.pidstatus_whole#1.unexpected_p "\textbf{\textit{2-way interaction}}" conspiracy_n "\textbf{\textit{Suspicious thinking}}" economy_ego "\textbf{\textit{Economic evaluations}}" knowledge_n "\textbf{\textit{Information}}", nolabel) width(\hsize) pr2(2) b(2) not star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label mtitles("FAIR" "SWD" "FAIR" "SWD") interaction("$\times$")style(tex) replace booktabs varlabels(_cons "\textbf{\textit{Constant}}" 1.pidstatus_whole "\hspace{1em} Loser (R)" 2.pidstatus_whole "\hspace{1em} Independent" 3.pidstatus_whole "\hspace{1em} Winner" 1.unexpected_p "\hspace{1em} Yes" 2.pidstatus_whole#1.unexpected_p "\hspace{1em} Independent $\times$ Unexpected" 3.pidstatus_whole#1.unexpected_p "\hspace{1em} Winner $\times$ Unexpected" cynicism_pre_n "\hspace{1em} Political cynicism (pre)" cynicism_post_n "\hspace{1em} Political cynicism (post)" cynicism_prepost_n "\hspace{1em} Political cynicism (pre/post)" people "\hspace{1em} Social mistrust" conspiracy_n "\hspace{1em} Conspiracy beliefs" knowledge_n "\hspace{1em} Political knowledge" economy_ego "\hspace{1em} Egotropic" economy_soc "\hspace{1em} Sociotropic") order(1.pidstatus_whole 2.pidstatus_whole 3.pidstatus_whole 1.unexpected_p 2.pidstatus_whole#1.unexpected_p 3.pidstatus_whole#1.unexpected_p conspiracy_n cynicism_pre_n cynicism_post_n cynicism_prepost_n people economy_ego economy_soc knowledge_n) stats(N r2, labels("Observations" "\textit{R}\textsuperscript{2}") fmt(%9.0fc %9.2fc)) nonotes title("Perceived Electoral Integrity and Satisfaction with Democracy, 2016 U.S. Presidential Election")

eststo clear

* Reported vote, Political cynicism

eststo: regress integrity_4pts i.voteactstatus_whole##i.unexpected_v conspiracy_n cynicism_pre_n people knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress integrity_4pts i.voteactstatus_whole##i.unexpected_v conspiracy_n cynicism_post_n people knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress integrity_4pts i.voteactstatus_whole##i.unexpected_v conspiracy_n cynicism_prepost_n people knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.voteactstatus_whole##i.unexpected_v conspiracy_n cynicism_pre_n people economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.voteactstatus_whole##i.unexpected_v conspiracy_n cynicism_post_n people economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]
eststo: regress swd_post i.voteactstatus_whole##i.unexpected_v conspiracy_n cynicism_prepost_n people economy_ego economy_soc knowledge_n i.male i.white age income education i.region [pweight=weight]

esttab using "us2016_anes_integrity_cynicism_vote.tex", alignment(ll) substitute({table} {table*} \begin{tabular*} \small\begin{tabular*}) wide drop(0.male 1.male 0.white 1.white age income education 1.region 2.region 3.region 4.region 0.unexpected_v 1.voteactstatus_whole#0.unexpected_v 2.voteactstatus_whole#0.unexpected_v 3.voteactstatus_whole#0.unexpected_v 1.voteactstatus_whole#1.unexpected_v) refcat(1.voteactstatus_whole "\textbf{\textit{Electoral status}}" 1.unexpected_v "\textbf{\textit{Unexpected outcome?}}" 2.voteactstatus_whole#1.unexpected_v "\textbf{\textit{2-way interaction}}" conspiracy_n "\textbf{\textit{Suspicious thinking}}" economy_ego "\textbf{\textit{Economic evaluations}}" knowledge_n "\textbf{\textit{Information}}", nolabel) width(\hsize) pr2(2) b(2) not star(+ 0.10 * 0.05 ** 0.01 *** 0.001) label mtitles("FAIR" "SWD" "FAIR" "SWD") interaction("$\times$")style(tex) replace booktabs varlabels(_cons "\textbf{\textit{Constant}}" 1.voteactstatus_whole "\hspace{1em} Loser (R)" 2.voteactstatus_whole "\hspace{1em} Non-voter" 3.voteactstatus_whole "\hspace{1em} Winner" 1.unexpected_v "\hspace{1em} Yes" 2.voteactstatus_whole#1.unexpected_v "\hspace{1em} Non-voter $\times$ Unexpected" 3.voteactstatus_whole#1.unexpected_v "\hspace{1em} Winner $\times$ Unexpected" cynicism_pre_n "\hspace{1em} Political cynicism (pre)" cynicism_post_n "\hspace{1em} Political cynicism (post)" cynicism_prepost_n "\hspace{1em} Political cynicism (pre/post)" people "\hspace{1em} Social mistrust" conspiracy_n "\hspace{1em} Conspiracy beliefs" knowledge_n "\hspace{1em} Political knowledge" economy_ego "\hspace{1em} Egotropic" economy_soc "\hspace{1em} Sociotropic") order(1.voteactstatus_whole 2.voteactstatus_whole 3.voteactstatus_whole 1.unexpected_v 2.voteactstatus_whole#1.unexpected_v 3.voteactstatus_whole#1.unexpected_v conspiracy_n cynicism_pre_n cynicism_post_n cynicism_prepost_n people economy_ego economy_soc knowledge_n) stats(N r2, labels("Observations" "\textit{R}\textsuperscript{2}") fmt(%9.0fc %9.2fc)) nonotes title("Perceived Electoral Integrity and Satisfaction with Democracy, 2016 U.S. Presidential Election")

eststo clear

log close